package pc15;

import java.util.Scanner;

public class J10Return {

	//return문을 사용하는 Method 연습!! 사칙연산
	public static void main(String[] args) {
		int x,y;	//사칙 연산을 위한 입력값
		int sum, minus, multiple, divide;
		String result = "";
		Scanner sc = new Scanner(System.in);
		
		System.out.print("변수1,2: "); x=sc.nextInt();y=sc.nextInt();
		
		sum = getSum(x,y);
		minus = getMinus(x,y);
		multiple = getMultiple(x,y);
		divide = getDivide(x,y);
		
		result += "------- 결과값은 ------- \n";
		result += "합:"+sum+",차:"+minus+",곱:"+multiple+",몫:"+divide;
		System.out.println(result);
		sc.close();
		
	}//main
	
	public static int getSum(int x, int y){
		return (x+y);
	}
	
	public static int getMinus(int x, int y){
		int minus;
		minus = x - y;
		if (minus < 0) minus = -minus;
		return minus;
	}

	public static int getMultiple(int x, int y){
		return (x*y);
	}

	public static int getDivide(int x, int y){
		return (x/y);
	}

}//class
